package com.mxf.agricultural.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mxf.agricultural.model.dto.order.OrderQueryRequest;
import com.mxf.agricultural.model.entity.Order;


import javax.servlet.http.HttpServletRequest;

/**
 * @author JD
 * @description 针对表【order(商品)】的数据库操作Service
 * @createDate 2024-02-11 19:11:26
 */
public interface OrderService extends IService<Order> {
    /**
     * 校验
     *
     * @param order
     * @param add
     */
    void validOrder(Order order, boolean add);

    /**
     * 获取查询条件
     *
     * @param orderQueryRequest
     * @return
     */
    QueryWrapper<Order> getQueryWrapper(OrderQueryRequest orderQueryRequest);


    /**
     * 分页获取商品封装
     *
     * @param orderPage
     * @param request
     * @return
     */
    Page<Order> getOrderPage(Page<Order> orderPage, HttpServletRequest request);
}
